﻿using Kaskelot.SP.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using umbraco.cms.businesslogic.macro;

namespace Kaskelot.Web.Masterpages
{
    public partial class KaskelotMaster : System.Web.UI.MasterPage
    {
        private static log4net.ILog logger = log4net.LogManager.GetLogger("Kaskelot");
        protected PlaceHolder phAnonTopNav;
        protected PlaceHolder phLoginTopNav;

        protected void Page_Load(object sender, EventArgs e)
        {
            logger.InfoFormat("AuthenticationLevel is {0}", Services.AuthenticationLevel.Anonymous.ToString());

            phAnonTopNav.Visible = WebContext.Current.AuthLevel == Services.AuthenticationLevel.Anonymous;
            phLoginTopNav.Visible = WebContext.Current.AuthLevel != Services.AuthenticationLevel.Anonymous;
        }
    }
}